package com.shujia.datasource;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.text.SimpleDateFormat;
import java.util.Date;

public class MoniDataSource {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new FileReader("/usr/local/soft/bigdata30/szt/data/ditie.txt"));
        String time = new SimpleDateFormat("yyyyMMdd").format(new Date());
        BufferedWriter bw = new BufferedWriter(new FileWriter("/usr/local/soft/bigdata30/szt/source/" + time + ".txt"));

        String line = null;
        while ((line=br.readLine())!=null){
            bw.write(line);
            bw.newLine();
            bw.flush();
        }

        bw.close();
        br.close();
    }
}
